package com.chexiehui.jc.mvp.home;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BasePage;
import com.chexiehui.jc.base.BaseView;
import com.chexiehui.jc.entity.ShopInfo;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 4s店咨询
 * @Auth SongJun
 * @Date 2019/11/20 10:05
 **/
public interface Shop4sConsultCovenant {

    interface View extends BaseView {
        void onGetListSuccess(BaseModel<BasePage<ShopInfo>> successResult);

        void onGetListFailure(BaseModel<Object> failureResult);

        String getLocationLat();

        String getLocationLng();

        String getLocationCity();

        String getDescType();
    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_HOME_SHOP_LIST)
        Observable<BaseModel<BasePage<ShopInfo>>> getShopList(
                @Field("lat") String lat,
                @Field("lng") String lng,
                @Field("descType") String descType,
                @Field("cityName") String cityName,
                @Field("pageIndex") int pageIndex,
                @Field("pageSize") int pageSize
        );
    }

    interface Presenter {
        void getShopList(int pageNum);

    }

}